Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All domain Registry Traversal per Backend #106

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

DoeringChristian
Copy link
Contributor

@DoeringChristian DoeringChristian commented Oct 23, 2024

The PR adds the option to traverse all registry entries for a backend.

This is required for function freezing, as it is not easily possible to get the domains of a variable representing a pointer, when traversing a C++ class such as a scene.
The fix is to just traverse the whole registry.

This PR makes the following changes:

  • modifies the jitc_registry_id_bound function to return the bound over all domains in the backend if the domain argument is a nullptr
  • Adds a jitc_registry_fill_ptrs function, taking a pointer to a memory region to fill with the registered pointers.
  • Adds the backend as a field to the Domain struct

@DoeringChristian
Copy link
Contributor Author

@wjakob, @merlinND This PR should be ready for review.

Copy link
Member

@merlinND merlinND left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making this one easy to review as well!

include/drjit-core/jit.h Outdated Show resolved Hide resolved
include/drjit-core/jit.h Outdated Show resolved Hide resolved
src/registry.cpp Show resolved Hide resolved
src/registry.cpp Outdated Show resolved Hide resolved
src/registry.cpp Outdated Show resolved Hide resolved
src/registry.h Outdated Show resolved Hide resolved
@merlinND merlinND added the enhancement New feature or request label Nov 1, 2024
@wjakob
Copy link
Member

wjakob commented Nov 15, 2024

Looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants